<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的订单</title>
    <style>
        /* 全局样式 - 严格遵循设计规范 */
        html,
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                         "PingFang SC", "Hiragino Sans GB",
                         "Microsoft YaHei", sans-serif;
            background-color: #faf9f5;
            color: #333333;
            font-size: 14px;
            line-height: 1.4;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        /* 页面容器 */
        .container {
            max-width: 480px;
            margin: 0 auto;
            background-color: #f1f2f4;
            min-height: 100%;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        /* 顶部导航栏 */
        .topNav {
            background-color: #ffffff;
            padding: 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 18px;
            font-weight: 600;
            color: #333333;
            border-bottom: 1px solid #e0e0e0;
        }

        .topNav-left {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border-radius: 4px;
            font-size: 18px;
            color: #333333;
        }


        .topNav-title {
            flex: 1;
            text-align: center;
            font-size: 18px;
            font-weight: 600;
        }

        /* 内容区域 */
        .contentArea {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 20px;
        }

        /* ===== 状态筛选Tab ===== */
        .tabContainer {
            background-color: #ffffff;
            display: flex;
            border-bottom: 1px solid #e0e0e0;
            padding: 0;
            overflow-x: auto;
            white-space: nowrap;
        }

        .tabItem {
            padding: 12px 16px;
            cursor: pointer;
            font-size: 14px;
            color: #999999;
            border-bottom: 2px solid transparent;
            transition: all 0.3s ease;
            flex-shrink: 0;
            font-weight: 400;
        }

        .tabItem.active {
            color: #333333;
            border-bottom-color: #333333;
            font-weight: 600;
        }

        .tabItem:hover {
            color: #333333;
        }

        /* ===== 订单卡片 ===== */
        .orderList {
            padding: 10px;
        }

        .orderCard {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .orderCard:hover {
            background-color: #fafafa;
        }

        /* 场馆和状态所在行 */
        .orderCardTop {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 12px;
            gap: 8px;
        }

        .orderVenue {
            font-size: 14px;
            font-weight: 600;
            color: #333333;
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .venueIcon {
            width: 20px;
            height: 20px;
            border: 1px solid #d0d0d0;
            border-radius: 3px;
            background-color: #fafafa;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 9px;
            color: #999999;
            flex-shrink: 0;
        }

        .orderVenue::after {
            content: '›';
            color: #999999;
        }

        .orderStatus {
            padding: 1px 6px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: 600;
            background-color: #f5f5f5;
            color: #666666;
            border: 1px solid #d0d0d0;
            white-space: nowrap;
            flex-shrink: 0;
        }

        /* 卡片主体：图片+内容+价格 */
        .orderCardBody {
            display: flex;
            gap: 12px;
            align-items: center;
        }

        .orderImage {
            width: 80px;
            height: 80px;
            background-color: #e8e8e8;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            flex-shrink: 0;
        }

        /* 占位符十字线 */
        .orderImage::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 70%;
            height: 1px;
            background: linear-gradient(to right, transparent, #ccc, transparent);
            z-index: 1;
        }

        .orderImage::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 1px;
            height: 70%;
            background: linear-gradient(to bottom, transparent, #ccc, transparent);
            z-index: 1;
        }

        .orderContent {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        /* 球局名称 */
        .orderTitle {
            font-size: 14px;
            color: #333333;
            margin-bottom: 6px;
        }

        /* 详情行：时间和地点 */
        .orderInfo {
            font-size: 11px;
            color: #999999;
            margin-bottom: 6px;
            line-height: 1.4;
        }


        .orderPrice {
            display: flex;
            flex-direction: column;
            gap: 2px;
            text-align: right;
        }

        .priceLabel {
            font-size: 13px;
            font-weight: 500;
            color: #333333;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- 顶部导航栏 -->
        <div class="topNav">
            <div class="topNav-left">‹</div>
            <div class="topNav-title">我的订单</div>
        </div>

        <!-- 状态筛选Tab -->
        <div class="tabContainer">
            <div class="tabItem active" data-tab="all">全部</div>
            <div class="tabItem" data-tab="completed">已完成</div>
            <div class="tabItem" data-tab="cancelled">已取消</div>
        </div>

        <!-- 内容区域 -->
        <div class="contentArea">
            <!-- 订单列表 -->
            <div class="orderList" id="orderList">
                <!-- 订单卡片 1 -->
                <div class="orderCard" data-status="cancelled">
                    <div class="orderCardTop">
                        <div class="orderVenue">
                            <div class="venueIcon">球馆</div>
                            <span>众乐谷丰路足球训练基地</span>
                        </div>
                        <div class="orderStatus">已取消</div>
                    </div>
                    <div class="orderCardBody">
                        <div class="orderImage"></div>
                        <div class="orderContent">
                            <div class="orderTitle">蓝色海洋局</div>
                            <div class="orderInfo">
                                <div>球局时间：2025-11-06 14:13</div>
                                <div>球馆：众乐谷丰路足球训练基地</div>
                            </div>
                        </div>
                        <div class="orderPrice">
                            <div class="priceLabel">¥0.02</div>
                        </div>
                    </div>
                </div>

                <!-- 订单卡片 2 -->
                <div class="orderCard" data-status="completed">
                    <div class="orderCardTop">
                        <div class="orderVenue">
                            <div class="venueIcon">球馆</div>
                            <span>众乐谷丰路足球训练基地</span>
                        </div>
                        <div class="orderStatus">已完成</div>
                    </div>
                    <div class="orderCardBody">
                        <div class="orderImage"></div>
                        <div class="orderContent">
                            <div class="orderTitle">烈火凤凰局</div>
                            <div class="orderInfo">
                                <div>球局时间：2025-10-30 17:55</div>
                                <div>球馆：众乐谷丰路足球训练基地</div>
                            </div>
                        </div>
                        <div class="orderPrice">
                            <div class="priceLabel">¥0.02</div>
                        </div>
                    </div>
                </div>

                <!-- 订单卡片 3 -->
                <div class="orderCard" data-status="completed">
                    <div class="orderCardTop">
                        <div class="orderVenue">
                            <div class="venueIcon">球馆</div>
                            <span>众乐谷丰路足球训练基地</span>
                        </div>
                        <div class="orderStatus">已完成</div>
                    </div>
                    <div class="orderCardBody">
                        <div class="orderImage"></div>
                        <div class="orderContent">
                            <div class="orderTitle">蓝天霸主局</div>
                            <div class="orderInfo">
                                <div>球局时间：2025-10-29 14:00</div>
                                <div>球馆：众乐谷丰路足球训练基地</div>
                            </div>
                        </div>
                        <div class="orderPrice">
                            <div class="priceLabel">¥0.02</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Tab筛选功能
        const tabItems = document.querySelectorAll('.tabItem');
        const orderCards = document.querySelectorAll('.orderCard');

        tabItems.forEach(tab => {
            tab.addEventListener('click', function() {
                // 更新tab的active状态
                tabItems.forEach(item => item.classList.remove('active'));
                this.classList.add('active');

                const filterStatus = this.getAttribute('data-tab');

                // 筛选订单卡片
                orderCards.forEach(card => {
                    if (filterStatus === 'all') {
                        card.style.display = 'block';
                    } else {
                        const cardStatus = card.getAttribute('data-status');
                        card.style.display = cardStatus === filterStatus ? 'block' : 'none';
                    }
                });
            });
        });

        // 订单卡片点击事件
        orderCards.forEach(card => {
            card.style.cursor = 'pointer';
            card.addEventListener('click', function() {
                // 链接到订单详情页
                window.location.href = '订单详情.html';
            });
        });
    </script>
</body>
</html>
